package com.wnxy.eleba.mapper;

import com.wnxy.eleba.entity.Dishes;
import com.wnxy.eleba.entity.Sj;
import com.wnxy.eleba.vo.DishesQueryParam;
import com.wnxy.eleba.vo.SjQueryParam;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DishesMapper {
    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(Dishes record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(Dishes record);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    Dishes selectByPrimaryKey(Integer id);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(Dishes record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(Dishes record);

    List<Dishes> showAll();

    List<Dishes> selectDishesByCondition(DishesQueryParam dishesQueryParam);

    int del(@Param("ids") List<Integer> ids);

    @Select("select distinct dishes_type from dishes")
    List<String> listAllDishesType();

}